package org.origin.centre.model.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;

/**
 * 通用的通过ID来更新数据-实体类
 *
 * @author ferret
 * @version 2024-05-08
 */
@SuppressWarnings("unused")
@Schema(description = "通用的通过ID来更新数据-实体类")
public final class XUpdateByIdDto {
    @NotBlank(message = "主键ID不能为空")
    @Schema(description = "主键ID", example = "1", requiredMode = Schema.RequiredMode.REQUIRED)
    private String id;

    public XUpdateByIdDto() {
    }

    public XUpdateByIdDto(String id) {
        this.id = id;
    }

    public String getId() {
        return this.id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Long longId(){
        return Long.parseLong(this.id);
    }

    public Integer integerId(){
        return Integer.parseInt(this.id);
    }
}
